<template>
  <div class="app-portal-body">
    <div class="app-portal-menucontent" v-if="app">
      <div class="app-form-group-label">函数分组</div>
      <func-tree :app-id="app.group_id" @select="handleSelectFunc" style="width:100%;height:100%;"></func-tree>
    </div>
    <func-list
      v-if="currentData"
      :current-data="currentData"
      class="h-full mr-0 mt-0 mb-0"
    />
  </div>
</template>

<script setup>
import { ref } from 'vue';
import funcTree from '../basic/func/func-tree.vue';
import funcList from '../basic/func/func-list.vue';

const props = defineProps({
  app: Object
});

const currentData = ref(null);

const handleSelectFunc = (data) => {
  currentData.value = data;
};
</script>
